<template>
		  <div class="edit_container">
	       <quill-editor v-model="content"
	              ref="myQuillEditor"
	              class="editer"
	              :options="editorOption" @ready="onEditorReady($event)">
	       </quill-editor>
	      <!--<button @click="aa">1111</button>-->
				<div style="width: 100%; text-align: center; margin-top: 20px;">
					<el-button type="primary" @click="submit">保存</el-button>
				</div>
	      </div>
</template>
<script type="text/javascript">
	import { quillEditor } from 'vue-quill-editor' //调用编辑器
	export default {
		props: ['params'],
		components: {
			quillEditor
		},
		data() {
			return {
				content: '',
			  editorOption:{
                    modules:{
                        toolbar:[
                          ['bold', 'italic', 'underline', 'strike'],        // toggled buttons
												  ['blockquote'],  
						//						  ['blockquote', 'code-block'],
												
												  [{ 'header': 1 }, { 'header': 2 }],               // custom button values
												  [{ 'list': 'ordered'}, { 'list': 'bullet' }],
												  [{ 'script': 'sub'}, { 'script': 'super' }],      // superscript/subscript
												  [{ 'indent': '-1'}, { 'indent': '+1' }],          // outdent/indent
						//						  [{ 'direction': 'rtl' }],                         // text direction
												
												  [{ 'font': [] }],
												  [{ 'size': ['small', false, 'large', 'huge'] }],  // custom dropdown
						//						  [{ 'header': [1, 2, 3, 4, 5, 6, false] }], 
												  [{ 'color': [] }, { 'background': [] }],          // dropdown with defaults from theme
												  [{ 'align': [] }],
												
												  //['clean'] ,             
												  ['image']                 
                        ]
                    }
                }
			}
		},
		 computed: {
		   editor() {
		    return this.$refs.myQuillEditor.quill
		   }
		  },
		created() {
			this.content = this.params.nr
			console.log(this.params,5666555)
		},
		methods: {
			onEditorReady(editor) {
   			},
			submit(){
				this.$emit('close', { cancel: true,type:'fwb',list:this.content})
			}
		}
	}
</script>
<style lang="less" scoped>
	
</style>